package Demo17;

public class Demo17 {

    public static void main(String[] args) {
        long count = 0;
        for (int i = 0; i <= 20250412; i++) {
            if(isnum(i)) {
                count++;
            }
        }
        System.out.println(count);
    }

    //
    public static boolean isnum(int num) {
        //一个数字0
        int a = 1;

        //两个数字2
        int b = 2;

        //一个数字5
        int c = 1;

        while (num > 0) {
            if (num % 10 == 0) {
                a--;
            }
            if (num % 10 == 2) {
                b--;
            }
            if (num % 10 == 5) {
                c--;
            }
            num /= 10;
        }

            if (a <= 0 && b <= 0 && c <= 0) {
                return true;
            }
            return false;
        }
}




